﻿using UnityEngine.UI;

public class ConfirmPanel : BaseComponent
{
    private Text rescTxt;
    private Button confirmBtn;
    private Button cancelBtn;
    public override void Binding()
    {
        ConfirmPanelModel cm = (ConfirmPanelModel)GetComponentModel();
        Text rescTxt = transform.Find("Panel/TextPanel/resc_txt").GetComponent<Text>();
        Button confirmBtn = transform.Find("Panel/confirm_btn").GetComponent<Button>();
        Button cancelBtn = transform.Find("Panel/cancel_btn").GetComponent<Button>();

        BindData(cm.textDM, (string value) =>
        {
            rescTxt.text = value;
        });
        confirmBtn.onClick.AddListener(cm.OnClickConfirm);
        cancelBtn.onClick.AddListener(cm.OnClickCancel);
    }

    public override void UnBinding()
    {

    }
}